﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StatisticsShipments.aspx.cs" Inherits="Automobile.service.UI.StatisticsShipments" %>

<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="Bookmark" href="/favicon.ico">
    <link rel="Shortcut Icon" href="/favicon.ico" />
    <link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.7/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="lib/icheck/icheck.css" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />
    <script src="BootstrapSouce/js/jquery.min.js"></script>
    <link href="BootstrapSouce/css/bootstrap.min.css" rel="stylesheet" />
    <script src="BootstrapSouce/js/bootstrap.min.js"></script>
    <title>销售统计</title>
</head>
<body>
    <form method="post" action="StatisticsShipments.aspx" id="ctl00">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="VtTCbRKybdl66qJFO0JOHups3JCZWVA5/g9DaxtcjV0EuN+AAg0Z6zcIpnmFEiPvP1kBatBEK2ksaZgCJ4mf74cgw1T/J5dncNhaI7s+4wE=" />
</div>
        <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 销售报表 <span class="c-gray en">&gt;</span> 销售统计 <a class="btn btn-success radius r" style="line-height: 1.6em; margin-top: 3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>
        <div class="page-container">
            <div class="text-c">
                <table style="width: 500px; margin-left: 300px">
                    <tr>
                        
                        <td style="width: 50px;">
                            <select runat="server" id="Select1" onclick="fg()">
                                <option>年</option>
                                <option>月</option>
                            </select>
                        </td>
                        <td class="w-200"> </td>
                        <td style="width: 88px;">
                            <select runat="server" id="Select2" onchange="jn()">
                                <option value="">--请选择--</option>
                                <option value="2008">2008年</option>
                                <option value="2009">2009年</option>
                                <option value="2010">2010年</option>
                                <option value="2011">2011年</option>
                                <option value="2012">2012年</option>
                                <option value="2013">2013年</option>
                                <option value="2014">2014年</option>
                                <option value="2015">2015年</option>
                                <option value="2016">2016年</option>
                                <option value="2017">2017年</option>
                                <option value="2018">2018年</option>
                                <option value="2019">2019年</option>
                            </select>

                        </td>
                        <td style="width: 30px;"></td>
                        <td style="width: 100px;">
                            <input id="TimeStart" type="text" />
                        </td>
                        <td style="width: 30px;">-
                        </td>
                        <td style="width: 100px;">
                            <input id="TimeEnd" type="text" />
                        </td>
                        <td style="width: 30px;"></td>
                        <td style="width: 50px;">
                            <%--<input type="button" id="Search1" onclick="sousuoY()" value="查询年份" />--%>
                            <button id="Search1" onclick="sousuoY()" type="button" class="btn btn-success"><i class="Hui-iconfont">&#xe665;</i> 查询年份</button>
                            <button id="Search2" onclick="sousuoM()" type="button" class="btn btn-success"><i class="Hui-iconfont">&#xe665;</i> 查询月份</button>
                        </td>
                    </tr>
                </table>
            </div>
            <div>
                <table class="table table-border table-bordered table-bg table-hover table-sort" id="psser1">
                    <thead>
                        <tr class="text-c">
                            <th>年份</th>
                            <th>总金额</th>
                            <th>盈利</th>
                        </tr>

                    </thead>
                    <tbody>
                    </tbody>

                </table>
                <div id="chaxunyue">
                    <span style="font-size:20px">年份：</span><span runat="server" style="font-size:20px" id="q"></span>
                </div>

                <table class="table table-border table-bordered table-bg table-hover table-sort" id="psser2">
                   
                    <thead>
                        <tr class="text-c">
                            <th>月份</th>
                            <th>总金额</th>
                            <th>盈利</th>
                        </tr>

                    </thead>
                    <tbody>
                    </tbody>

                </table>
            </div>





        </div>
        <script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
        <script type="text/javascript" src="lib/layer/2.1/layer.js"></script>
        <script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
        <script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
        <script type="text/javascript" src="static/h-ui/js/H-ui.js"></script>
        <script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script>

    
<div class="aspNetHidden">

	<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="FB9E1DBD" />
</div></form>

<!-- Visual Studio Browser Link -->
<script type="application/json" id="__browserLink_initializationData">
    {"appName":"Chrome","requestId":"60579f61164b44a1849c1b82bc449573"}
</script>
<script type="text/javascript" src="http://localhost:8024/312c2a19c11d45c0a4324bbd656710ca/browserLink" async="async"></script>
<!-- End Browser Link -->

</body>
</html>
<script>
    $(function () {

        $("#Select2").hide();
        $("#Search2").hide();
        $("#psser2").hide();
        $("#chaxunyue").hide();
    })
    function fg() {
        var s = $("#Select1 option:selected").val();
        if (s == '年') {
            $("#Select2").hide();
            $("#Search2").hide();
            $("#Search1").show();
            $("#psser1").show();
            $("#psser2").hide();
            $("#chaxunyue").hide();
        }
        else {
            $("#Select2").show();
            $("#Search1").hide();
            $("#Search2").show();
            $("#psser2").show();
            $("#psser1").hide();
            $("#chaxunyue").show();
        }
    }
    function sousuoY() {

        $("#psser1 tbody").empty();
        $.ajax({
            type: "post",
            url: "Handler/HandlerSearchY.ashx",
            data: {
                TimeStart: $("#TimeStart").val(),
                TimeEnd: $("#TimeEnd").val(),
            },
            
            success: function (data1) {
                var data = eval(data1);
                $(data).each(function (index, item) {
                    var str = "<tr class='text-c'><td>" + item.YearNum + "年</td><td>" + item.YearMoney + "元</td><td>" + item.ProfitY + "元</td></tr>"
                    $("#psser1 tbody").append(str);
                })
            }
        })
    }
    function jn()
    {
        var s1 = $("#Select2 option:selected").val();
        $("#q").html(s1+"年");
    }
    function sousuoM() {
        
        $("#psser2 tbody").empty();
        $.ajax({
            type: "post",
            url: "Handler/HandlerSearchM.ashx",
            data: {
                SYear: $("#Select2 option:selected").val(),
                TimeStart: $("#TimeStart").val(),
                TimeEnd: $("#TimeEnd").val(),
            },

            success: function (data1) {
                var data = eval(data1);
                $(data).each(function (index, item) {
                    var str1 = "<tr class='text-c'><td>" + item.MonthNum + "月</td><td>" + item.MonthMoney + "元</td><td>" + item.Profit + "元</td></tr>"
                    $("#psser2 tbody").append(str1);
                })
            }
        })
    }
</script>